:: %1 is the P4PORT setting, ex:tw-p4proxy:1667
:: %2 is the P4CLIENT setting, ex:default.al_siao.SMEX-Lead
:: %3 is the P4USER setting, ex:al_siao
:: %4 is the password for the user

set settingFile=%temp%\P4Setting.txt
echo P4PORT=%~1>%settingFile%
echo P4CLIENT=%~2>>%settingFile%
echo P4USER=%~3>>%settingFile%

p4 set P4CONFIG=%settingFile%
echo %~4|p4 login